<template>
    <RouterLink to="/ShowUserFinan" style="margin-right:10px;">用户理财</RouterLink>
    <RouterLink to="/ShowUserBorrow" style="margin-right:10px;">用户借款</RouterLink>

    <h2>投资项目列表</h2>
    <InvestInfoContent v-slot="itme">
    <a href="#" @click="Invest(itme.id)">投资</a>
    </InvestInfoContent>
</template>

<script setup lang="ts">
import InvestInfoContent from './InvestInfoContent.vue';
import {useRouter} from 'vue-router';

const router = useRouter();
// 投资
const Invest = (id: number) => {
    console.log(id);
    router.push({
        path: '/AddUserInvestInfo',
        query: {
            Iid: id
        }
    });
};
</script>